<include file="Public:header" />
<script>
$(document).ready(function(e) {
    $('.showcurimg').each(function(index, element) {
        $(this).click(function(e) {
            $(this).find('img.img').show();
        });
		$(this).mouseleave(function(e) {
            $(this).find('img.img').hide();
        });
    });
});
</script>	
<div class="container main"> <include file="Public:left" />
  <div class="w790">
    <div class="h"><a href="{:U('collect')}" class="btn btn-info"><i class="glyphicon glyphicon-plus"></i>采集</a>
     <a data-toggle="modal" data-target="#myModal" href="javascript:void(0);" class="btn btn-info"><i class="glyphicon glyphicon-hand-up"></i> 文章/视频</a>
      <form action="{:U('index')}" method="get" class="fr form-inline">
      
      <select name="category_id" id="pid" class="form-control">
          <option value="0">请选择分类</option>
          <volist name="pid_list" id="vo">
            <option <eq name="category_id" value="$vo['id']">selected="selected"</eq> value="{$vo.id}">{$vo.title}</option>
            <volist name="vo['sub']" id="svo">
               <option <eq name="category_id" value="$svo['id']">selected="selected"</eq> value="{$svo.id}">{:getdeepstr($svo['deep'])}{$svo.title}</option>
            </volist>
          </volist>
      </select>
        <input type="hidden" name="pagesize" value="{$pagesize}" />
        <input type="text" name="keywords" placeholder="输入搜索关键词" class="form-control" value="{$keywords}" />
        <button type="submit" class="btn btn-default">搜索</button>
      </form></div>
    
    <div class="table_">
      <table class="table table-bordered" width="100%" border="0" cellspacing="0" cellpadding="0">
        <thead>
          <tr>
            <td align="center">ID</td>
            <td align="center">标题</td><td align="center">图片</td>
            
            <td align="center">所属分类</td>
            <td align="center">状态</td>
            
            <td align="center">排序</td>
            <td align="center">操作</td>
          </tr>
        </thead>
        <volist name="list" id="vo">
          <tr class="data_list">
            <td align="center">
            
            
            
            
           
            
            <input type="checkbox" value="{$vo.id}" id="id{$vo.id}" class="sall" name="id">{$vo.id}
            
          
          
          
            
              </td>
            <td><span class="ajaxText" tablename="Collect" field="title" id="{$vo.id}" val="{$vo.title}">{$vo.title}</span></td>
            
            <td align="center">
            <notempty name="vo['img_url']"><a class="showcurimg" href="javascript:void(0);"><img src="{:getThumbPath($vo['img_url'])}" style="height:50px;" /><img src="{:getThumbPath($vo['img_url'])}" style="width:200px; position:absolute; margin-top:0px; display:none;" class="img" /></a></notempty>
            
            </td>
            
            
           
            <td align="center">{$vo.category_name}</td>
            <td align="center"><eq name="vo['status']" value="1"><span class="status1 status_btn" field="status,{$vo.id}"></span>
                <else/>
                <span class="status0 status_btn" field="status,{$vo.id}"></span></eq></td>
            
            <td align="center"><input name="sort" width="30" type="text" value="{$vo.sort}" size="4" />
              <a href="javascript:void(0);" onclick="update_sortClick('id','up',this,'sort','{:U('dosort')}');">上</a><a href="javascript:void(0);" onclick="update_sortClick('id','',this,'sort','{:U('dosort')}');">下</a></td>
            <td align="center">
            
            
            <a href="{:U('collecttonews', array('id' => $vo['id']))}"><span style="color:#f00;">点击选择</span></a>
            <a href="{:U('edit',array('id'=>$vo['id']))}"><i class="glyphicon glyphicon-edit"></i> 编辑</a> | <a href="{:U('delete',array('id'=>$vo['id']))}" onclick="return confirm('您确定要删除这条记录吗？');"><i class="glyphicon glyphicon-trash"></i> 删除</a></td>
          </tr>
        </volist>
      </table>
      <div class="pages">
        <div class="controlList fl"><a href="javascript:void(0);" class="btn btn-primary btn-sm" onclick="sall();"><i class="glyphicon glyphicon-check"></i> 全选/反选</a> <a href="javascript:void(0);" class="btn btn-primary btn-sm" onclick="rall();"><i class="glyphicon glyphicon-unchecked"></i> 全不选</a> <a class="btn btn-danger btn-sm" href="javascript:void(0);" onclick="delall();"><i class="glyphicon glyphicon-trash"></i> 删除选中</a> <a href="javascript:void(0);" class="btn btn-primary btn-sm" onclick="update_sort('id','sort','','{:U('dosort')}');"><i class="glyphicon glyphicon-refresh"></i> 更新排序</a> 
        
        <label class="form-inline"><select class="form-control" name="category_id" id="movepid">
          <option value="0">请选择栏目</option>
          <volist name="pid_list" id="vo">
            <option value="{$vo.id}">{$vo.title}</option>
            <volist name="vo['sub']" id="svo">
               <option value="{$svo.id}">{:getdeepstr($svo['deep'])}{$svo.title}</option>
            </volist>
          </volist>
        </select></label>
        
        <button type="button" onclick="movenews(document.getElementById('movepid'));" class="btn btn-default btn-sm"><i class="glyphicon glyphicon-move icon"></i> 移动到分类</button></div>
        <form class="fr" style="display:inline;" id="pagesize" action="" method="get">
         <label class="form-inline"> 每页
          <select name="pagesize" onchange="document.getElementById('pagesize').submit();" class="form-control">
            <option 
            <eq name="pagesize" value="10">selected="selected"</eq>
             value="10">10
            </option>
            <option 
            <eq name="pagesize" value="20">selected="selected"</eq>
             value="20">20
            </option>
            <option 
            <eq name="pagesize" value="30">selected="selected"</eq>
             value="30">30
            </option>
            <option 
            <eq name="pagesize" value="50">selected="selected"</eq>
             value="50">50
            </option>
            <option 
            <eq name="pagesize" value="100">selected="selected"</eq>
             value="100">100
            </option>
            <option 
            <eq name="pagesize" value="500">selected="selected"</eq>
             value="500">500
            </option>
          </select>
          条</label>
          <input type="hidden" name="category_id" value="{$category_id}" />
          <input type="hidden" name="keywords" value="{$keywords}" />
        </form>
        <div class="fr">{$pages}</div>
      </div>
    </div>
  </div>
  <div class="clear"></div>
</div>
  <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
      <div class="modal-dialog" role="document">
        <div class="modal-content">
          <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
            <h4 class="modal-title" id="myModalLabel">选择分类</h4>
          </div>
          <div class="modal-body collectcategoryList">
             
             
             
             <volist name="pid_list" id="vo">
             

            <h3><a href="{:U('index', array('category_id' => $vo['id']))}" <eq name="vo['id']" value="$_GET['category_id']">class="on"</eq>>{$vo.title}</a>
            </h3>
            <div class="subcate"><volist name="vo['sub']" id="svo">
                <a href="{:U('index', array('category_id' => $svo['id']))}" <eq name="svo['id']" value="$_GET['category_id']">class="on"</eq>>{$svo.title}</a>
            </volist></div>
            
            
          </volist>
             
             
             
             
             
          </div>
          
        </div> 
      </div>
    </div><style>.NewsListMobile.media {

    background: #fff;
}
.collectcategoryList h3{font-size:18px; font-weight:bold; border-bottom:1px solid #eee; padding:8px 0;}
.collectcategoryList .subcate a{margin:5px; border:1px solid #eee; font-size:16px; padding:5px; display:inline-block;}
.collectcategoryList .subcate a.on{color:#f00;}
</style>
<include file="Public:footer" />